home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 7
/
FM Towns Free Software Collection 7.iso
/
t_os
/
gpen32k
/
source.exe
/
LSRC
/
SPLITPAT.C
< prev
Wrap
Text File
|
1993-03-24
|
472b
|
30 lines
/* High-C互換ライブラリ */
#include <string.h>
void _splitpath( char *path, char *drv, char *dir, char *fn, char *ext)
{
char a[200];
char *tmp;
int j=0;
strcpy(a, path);
while (strpbrk(path, ":")!=NULL)
{
drv[j++] = *(path++);
}
drv[j] = 0;
j = 0;
while (strpbrk(path, "\\")!=NULL)
{
dir[j++] = *(path++);
}
dir[j] = 0;
j = 0;
while (*path!='.' && *path!=0)
{
fn[j++] = *(path++);
}
fn[j] = 0;
strcpy(ext,path);
}